<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>数值类型</title>
</head>
<body>
<h1 style="color:#0ff">数值类型</h1>
<script type="text/javascript">
var num1 = 0.1;
var num2 = 0.2;
console.log(num1);
console.log(num2);
num3 = 0.3;
console.log(num3);
/*尽量避免浮点数运算*/
console.log(num3 == (num1+num2));
</script>
</body>
</html>